<?php
 
+
 
+// 连接数据库
 
+$dbc = mysqli_connect ('localhost', 'root', 'root', 'students');
 
+
 
+// 指定连接器的编码方式
 
+mysqli_set_charset($dbc, 'utf8mb4');
 
+
 
+// 对数据库进行操作
 
+$query = 'SELECT * FROM info';
 
+$result = mysqli_query($dbc, $query);
 
+
 
+// 处理查询到的数据
 
+while ($row = mysqli_fetch_array($result)) {
 
+    echo "<pre>";
 
+    var_dump($row['name']);
 
+    echo "</pre>";
 
+ }
 
+
 
+// 释放资源
 
+mysqli_free_result ($result);
 
+mysqli_close($dbc);
     
\ No newline at end of file